package de.gwtprime.shared.requestFactory.request;

import java.util.List;

import com.google.web.bindery.requestfactory.shared.InstanceRequest;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;

import de.gwtprime.server.model.ArticleSection;
import de.gwtprime.shared.requestFactory.ArticleSectionProxy;
import de.gwtprime.shared.requestFactory.QuestionProxy;
import de.gwtprime.shared.requestFactory.User2Proxy;
import de.gwtprime.shared.requestFactory.VoteProxy;
import de.gwtprime.shared.requestFactory.VoteSectionCompletedProxy;

@Service(ArticleSection.class)
public interface ArticleSectionRequest extends RequestContext{

	Request<ArticleSectionProxy> findArticleSection(Long id);

	InstanceRequest<ArticleSectionProxy, Long> persist();

	InstanceRequest<ArticleSectionProxy, Void> remove();
	
	InstanceRequest<ArticleSectionProxy, Void> addVoteAndPersist(VoteProxy section, User2Proxy user);
	
	InstanceRequest<ArticleSectionProxy, Void> addVoteSectionCompleteAndPersist(VoteSectionCompletedProxy section, User2Proxy user);
	
	InstanceRequest<ArticleSectionProxy, QuestionProxy> addQuestion(QuestionProxy question);
	
	InstanceRequest<ArticleSectionProxy, List<QuestionProxy>> loadQuestions();
}
